import hyRequest from '@/service/index'

// 获取权限列表
export const getRole = (form?: any) => {
  return hyRequest.post({
    url: '/village/role/page',
    params: form
  })
}

// 更改角色
export const editRole = (form?: any) => {
  return hyRequest.post({
    url: '/village/role/update',
    data: form
  })
}

// 新增角色
export const addRole = (form?: any) => {
  return hyRequest.post({
    url: '/village/role/insert',
    data: form
  })
}

// 删除角色
export const delRole = (form?: any) => {
  return hyRequest.post({
    url: '/village/role/delete',
    params: form
  })
}

// 详情角色
export const detailRole = (roleId: any) => {
  return hyRequest.post({
    url: '/village/role/select',
    params: roleId
  })
}

// 获取全部角色
export const getAllUser = (form: any) => {
  return hyRequest.post({
    url: '/village/role/findAll',
    params: form
  })
}
